/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.jjsoft.celularessuc.gco.mdl;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Johnny
 */
@Entity
@Table(name = "seq_proformas", catalog = "celularessuccom", schema = "public")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "SeqProformas.findAll", query = "SELECT s FROM SeqProformas s"),
    @NamedQuery(name = "SeqProformas.findByIdsucursal", query = "SELECT s FROM SeqProformas s WHERE s.idsucursal = :idsucursal"),
    @NamedQuery(name = "SeqProformas.findBySecuencia", query = "SELECT s FROM SeqProformas s WHERE s.secuencia = :secuencia")})
public class SeqProformas implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer idsucursal;
    private Integer secuencia;

    public SeqProformas() {
    }

    public SeqProformas(Integer idsucursal) {
        this.idsucursal = idsucursal;
    }

    public Integer getIdsucursal() {
        return idsucursal;
    }

    public void setIdsucursal(Integer idsucursal) {
        this.idsucursal = idsucursal;
    }

    public Integer getSecuencia() {
        return secuencia;
    }

    public void setSecuencia(Integer secuencia) {
        this.secuencia = secuencia;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idsucursal != null ? idsucursal.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SeqProformas)) {
            return false;
        }
        SeqProformas other = (SeqProformas) object;
        if ((this.idsucursal == null && other.idsucursal != null) || (this.idsucursal != null && !this.idsucursal.equals(other.idsucursal))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.jjsoft.celularessuc.gco.mdl.SeqProformas[ idsucursal=" + idsucursal + " ]";
    }
    
}
